package company.permissionsystem.service;

import company.permissionsystem.dao.DepartmentDao;
import company.permissionsystem.model.entity.Department;
import company.permissionsystem.model.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.Instant;
import java.util.List;

@Service
public class DepartmentService {

    @Autowired
    private DepartmentDao departmentDao;

    public Department findDepartmentById(Integer id) {
        return departmentDao.findDepartmentById(id);
    }

    public List<Department> findAllDepartment() {
        return departmentDao.findAllDepartment();
    }

    public List<SysUser> findEmployeeByDepartmentId(Long id) {
        return departmentDao.findEmployeeByDepartmentId(id);
    }
}
